package com.jrx.anytxn.investor.bean;

import com.jrx.anytxn.common.annotation.MethodType;
import com.jrx.anytxn.common.constant.CommonContants;
import com.jrx.anytxn.investor.entity.*;
import com.jrx.anytxn.transaction.constant.TransBizConstant;
import org.apache.commons.collections.CollectionUtils;

import java.util.ArrayList;
import java.util.List;

/**
 * 抛账 更新实体
 *
 * @author liuyang
 * @date 2020-05-21
 */
public class InvestorCastAccountBean {

    private List<AmInterestAccrualInvestorInfo> interestAccrualInfoList = new ArrayList<>();

    private List<AmAccountMainInvestorInfo> accountMainInfoList = new ArrayList<>();

    private List<AmLoanAccountInvestorInfo> updateLoanAccounList = new ArrayList<>();

    private List<AmRepaymentPlanInvestorInfo> updateRepaymentPlanList = new ArrayList<>();

    private List<TlGlInterfaceInvestorInfo> glInterfaceInfoList = new ArrayList<>();

    @MethodType(CommonContants.METHOD_TYPE_SAVE)
    public List<AmInterestAccrualInvestorInfo> getInterestAccrualInfoList() {
        return interestAccrualInfoList;
    }

    @MethodType(CommonContants.METHOD_TYPE_SAVE)
    public List<AmAccountMainInvestorInfo> getAccountMainInfoList() {
        return accountMainInfoList;
    }

    @MethodType(CommonContants.METHOD_TYPE_UPDATE)
    public List<AmLoanAccountInvestorInfo> getUpdateLoanAccounList() {
        return updateLoanAccounList;
    }

    @MethodType(CommonContants.METHOD_TYPE_UPDATE)
    public List<AmRepaymentPlanInvestorInfo> getUpdateRepaymentPlanList() {
        return updateRepaymentPlanList;
    }

    @MethodType(CommonContants.METHOD_TYPE_SAVE)
    public List<TlGlInterfaceInvestorInfo> getGlInterfaceInfoList() {
        return glInterfaceInfoList;
    }

    public void setInterestAccrualInfoList(List<AmInterestAccrualInvestorInfo> interestAccrualInfoList) {
        this.interestAccrualInfoList = interestAccrualInfoList;
    }

    public void addInterestAccrualInfo(AmInterestAccrualInvestorInfo amInterestAccrualInfo) {
        if(null != amInterestAccrualInfo) {
            this.interestAccrualInfoList.add(amInterestAccrualInfo);
        }
    }

    public void setAccountMainInfoList(List<AmAccountMainInvestorInfo> accountMainInfoList) {
        this.accountMainInfoList = accountMainInfoList;
    }

    public void addAccountMainInfo(AmAccountMainInvestorInfo amAccountMainInfo) {
        this.accountMainInfoList.add(amAccountMainInfo);
    }

    public void setUpdateLoanAccounList(List<AmLoanAccountInvestorInfo> updateLoanAccounList) {
        this.updateLoanAccounList = updateLoanAccounList;
    }

    public void addUpdateLoanAccount(AmLoanAccountInvestorInfo loanAccountInfo) {
        this.updateLoanAccounList.add(loanAccountInfo);
    }

    public void setUpdateRepaymentPlanList(List<AmRepaymentPlanInvestorInfo> updateRepaymentPlanList) {
        this.updateRepaymentPlanList = updateRepaymentPlanList;
    }

    public void addUpdateRepaymentPlan(AmRepaymentPlanInvestorInfo repaymentPlanInfo) {
        this.updateRepaymentPlanList.add(repaymentPlanInfo);
    }

    public void setGlInterfaceInfoList(List<TlGlInterfaceInvestorInfo> glInterfaceInfoList) {
        this.glInterfaceInfoList = glInterfaceInfoList;
    }

    public void addTlGlInterfaceInfo(TlGlInterfaceInvestorInfo gl){
        if(null != gl){
            this.glInterfaceInfoList.add(gl);
        }
    }

    public void addAllTlGlInterfaceInfo(List<TlGlInterfaceInvestorInfo> glList){
        if(CollectionUtils.isNotEmpty(glList)){
            this.glInterfaceInfoList.addAll(glList);
        }
    }

    public void addAccuIntrList(List<AmInterestAccrualInvestorInfo> interestAccrualInfoList) {
        if(CollectionUtils.isNotEmpty(interestAccrualInfoList)){
            this.interestAccrualInfoList.addAll(interestAccrualInfoList);
        }
    }
}
